<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <body>

        <ui:composition>

            <h3>Pesquisa de Alunos</h3>

            <div id="stylized" class="myform">

                <h:outputLabel>Nome: <span class="small"><!--<p:commandLink onclick="dlgPesquisa.show();" value="pesquisa avançada" />-->Nome para pesquisa</span></h:outputLabel>
                <h:inputText value="#{AlunoController.pesquisaAlunoNome}"></h:inputText>
                <h:commandButton styleClass="button" action="#{AlunoController.pesquisaSimples}" value="Pesquisar" />

                <br />
                <br />

            </div>
            <p:dataTable var="alunoTemp" value="#{AlunoController.pesquisaAalunos}" widgetVar="alunoTable" paginator="true" rows="20" rowsPerPageTemplate="10,20,50,100">
                <!--
                                <f:facet name="header">  
                                    <p:outputPanel>  
                                        <h:outputText value="Pesquisar Alunos:" />  
                                        <p:inputText id="pesq" onkeyup="alunoTable.filter()" />  
                                    </p:outputPanel>  
                                </f:facet>  -->


                <p:column filterBy="#{alunoTemp.nome}" footerText="contains"  filterMatchMode="contains">
                    <f:facet name="header">
                        <h:outputText value="Nome" />
                    </f:facet>
                    <h:outputText value="#{alunoTemp.nome}" />
                </p:column>

                <!--                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Turmas" />
                                    </f:facet>
                                                            <ui:repeat value="{alunoTemp.matriculados}" var="matriculadoTmp" >
                                                                <h:outputText value="{matriculadoTmp.turma.nome}" />
                                                                <h:outputText value=" " />
                                                            </ui:repeat>
                
                
                                    <c:forEach items="{alunoTemp.matriculados}" var="matriculadoTmp" >
                                        <h:outputText value="{matriculadoTmp.turma.nome}" />
                                        <br />
                                    </c:forEach>
                
                
                
                
                                </p:column>-->

                <p:column style="text-align: center;" >
                    <f:facet name="header">
                        <h:outputText value="Painel" />
                    </f:facet>
                    <p:commandButton image="ui-icon ui-icon-search" title="visualizar" actionListener="#{AlunoController.load}" ajax="false"/>
                    <p:commandButton image="ui-icon ui-icon-disk" title="visualizar" value="Matricular" action="#{MatriculadoController.loadAluno}"  ajax="false"/>
                </p:column>
            </p:dataTable>







        </ui:composition>

    </body>
</html>
